import java.util.Scanner;

public class Test {
    public static Operation func11(String s) {
        if(s.equals("+")) {
            return new Add();
        }else  if(s.equals("-")){
            return new Subtract();
        } else if (s.equals("*")) {
            return new Multiply();
        } else if (s.equals("/")) {
            return new Divide();
        } else if (s.equals("%")) {
            return new Mod();
        }else  {
            return new Power();
        }
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            double x = in.nextDouble();//输入第一个操作数
            in.nextLine();//吸收上一次输入留下的回车
            String s = in.nextLine();//输入操作符
            double y = in.nextDouble();//输入第三个操作数
            Operation operation = func11(s);
            double sum = operation.func(x,y);
            System.out.println(sum);
        }
    }
    public static void main1(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            String s = in.nextLine();
            String[] str = s.split(" ");

            for (String x:str) {
                String a = x;
                if(a.equals('q')) {
                    break;
                }
            }
        }
    }
}
